DevForce Help Reference
Or(IPredicateDescription[]) Method
Example 


Returns a CompositePredicateDescription which represents a conditional OR operation.
Syntax
'Declaration
 
Public Overloads Shared Function Or( _
   ByVal ParamArray predicateDescriptions() As IPredicateDescription _
) As CompositePredicateDescription
'Usage
 
Dim predicateDescriptions() As IPredicateDescription
Dim value As CompositePredicateDescription
 
value = PredicateBuilder.Or(predicateDescriptions)

Parameters

predicateDescriptions
Example
var mgr = new DomainModelEntityManager();

var expr1 = new PredicateDescription(typeof(Customer), "Country", FilterOperator.IsEqualTo, "Mexico");
var expr2 = new PredicateDescription(typeof(Customer), "CompanyName", FilterOperator.StartsWith, "A");

// Where companyname starts with A or country = mexico
var finalcrit = PredicateBuilder.Or(expr1, expr2);
var query = mgr.Customers.Where(finalcrit);
var list = query.ToList();
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

PredicateBuilder Class
PredicateBuilder Members
Overload List

Send Feedback